package com.yanqu.road.entity.enums;

public enum eOrderStatus {

	/**
	 * 预付订单 玩家还未支付
	 */
	PreOrder(0),

	/**
	 * 已支付 钱还未到账
	 */
	ToBeCharged(1),

	/**
	 * 已支付 钱已到账
	 */
	HasBeenCharged(2),

	/**
	 * 刷单   玩家修改支付金额
	 */
	DirtyCharge(3),

	/**
	 * 返还元宝
	 */
	ReturnIngots(4),
	;

	private final byte value;

	eOrderStatus(int value) {
		this.value = (byte) value;
		eOrderStatus.getMappings().put(value, this);
	}

	public byte getValue() {
		return value;
	}

	private static java.util.HashMap<Integer, eOrderStatus> mappings;

	private synchronized static java.util.HashMap<Integer, eOrderStatus> getMappings() {
		if (mappings == null) {
			mappings = new java.util.HashMap<Integer, eOrderStatus>();
		}
		return mappings;
	}

	public static eOrderStatus forValue(int value) {
		return getMappings().get(value);
	}
}
